<template>
	<view class="page">
		<view class="txt">
			<b>祖国，我爱你！</b>
		</view>
		
		<image :src="imageSrc" style="width: 100px; height: 100px; justify-content: center;"></image>
		
		<button type="default" @click="showGuoqi">国旗</button>
		<button type="default" @click="showGuohui">国徽</button>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imageSrc: '../../static/images/flag.png',
				
				
			}
		},
		methods: {
			showGuoqi() {
				console.log('国旗');
				// 设置image的src为国旗
				this.imageSrc = '../../static/images/flag.png';
			},
			
			showGuohui() {
				console.log('国徽')
				// 设置image的src为国徽
				this.imageSrc = '../../static/images/guohui.jpg';
			}
		}
	}
</script>

<style>
	.txt{
		color: red;
		font-size: 20px;
		text-align: center;
	}

</style>
